


Type testGrid Extends TTest

	Field g:TGrid
	
	Method SetUp() {before}
		g = New TGrid
	End Method
	
	Method CleanUp() {after}
		g = Null
	End Method
	
	'can we create a grid
	Method testConstructor() {test}
		assertNotNull(g)
	End Method
	
	'can we set name
	Method testSetName() {test}
		g.SetName("yo")
		assertEquals("yo", g.name)
	End Method
	
	'can we change zoom
	Method testZoom() {test}
		g.ChangeZoom(5)
		
		'default zoom is 6
		assertEqualsI(11, g.zoomLevel)
	End Method
	
	'can we increase grid
	Method testIncreaseGrid() {test}
		g.IncreaseGrid()

		'max size is 8
		assertEqualsI(8, g.gridSize)
	End Method
	
	'can we decrease grid
	Method testDecreaseGrid() {test}
		g.DecreaseGrid()

		'default size is 8
		assertEqualsI(4, g.gridSize)
	End Method
	
	'can we move grid
	Method testMoveGrid() {test}
		g.Move(10, 15)
		
		assertEqualsI(10, g.renderOffset.x)
		assertEqualsI(15, g.renderOffset.y)
	End Method
	
	'can we set visible flag
	Method testSetVisible() {test}
		g.SetVisible(False)
	
		assertFalse(g.visible)
	End Method
	
	
	
End Type
